#1.循环打印“人生苦短，我要python"
"""
多行注释
"""

"""
while true:
print('dddd')
"""

#while 后加入条件
#while 1>0 and 2>0:
#print('人生苦短')

#数字相加

"""
count=1
value=count+1
print(2)
"""
# 通过循环，每次循环让count+1
"""count =1
while True:
    print(count)
    count = count + 1
"""
"""
count = 1
while count <= 10:
    print('count')
    count=count+1
print('closed')
"""
#请通过循环打印1,2,3,4,5,6，8,9,10

# count = 0
# while count <=10 :
#     count=count+1
#     if count !=7:
#         print(count)
#
# print('closed')

# count = 0
# while count <=10 :
#     count=count+1
#     if count ==7:
#         pass
#     else:
#         print(count)
#
# print('closed')


"""---------"""
"""---------"""
"""---------"""
#关键字：break
# while True:
#     print(666)
#     break
# print('closed')

#通过break实现1~10
count =1
# while True:
#     print(count)
#     if count == 10 :
#      break
#     count=count+1

# while True:
#     print('hello')
#     while True:
#         print(666)
#         break
#     break
#8 关键字 continue
#示例：12345678910
# count = 1
# while count<=10:
#     print(count)
#     continue # 本次循环如果遇见continue则不再继续往下走而是回到循环条件
#     count=count+1

#示例：12345678910

# count = 11
# while count <=10:
#     if count == 7:
#         count=count+1
#         continue
#     print (count)
#     count=count+1

#while else
count=1
while count<=10:
    print(count)
    if count<=10:
       break
    count=count+1
else:
    print('close')
print('close again')